Neural Network CCI - RSIThis is a test of neural network with one layer.
Two layers will follow soon.
Signals are given by CCI or RSI.
Method 1 triggers a change of oscillator (buy if >0)
Method 2 triggers oscillator over 0 (for CCI only)
How to use:
1- launch the strategy on a chart,
2- open "Strategy Tester" tab
3- open startegy option panel
4- modify x11, x12, x13 and x14 to get the best results (net profit, profit factor, drawdown, etc...)
5- repeat once a week
Need help with self-optimization: I couldn't yet found a formula to optimize profit or win% or whatever changing values of x11, x12, x13 and x14 inside the strategy.
Cari skrip untuk "profit factor"
BitMEX pump catcherWhat is going on here? This strategy is pretty simple. We start by measuring a very long chunk of volume history on BitMEX:XBTUSD 1 hour chart to find out if the current volume is high or low. At 1.0 the indicator is showing we are at 100% of normal historical volume. The blue line is a measure of recent volume! This indicator gets interested when the volume drops below 90% of the regular volume (0.9), and then comes back up over 90%. There's usually a pump of increased price activity during this time. When the 0.9 line is crossed by the blue line, the indicator surveys the last 2 bars of price action to figure out which way we're going, long or short. Green is long. Red is short. To exit the trade we use a 7 period fast ema of the volume crossing under an 11 ema slower period which shows declining interest in the market signifying an end to the pump or dump. The profit factor is quite high with 5x leverage, but historically we see 50% drawdown -- very risky. 1x leverage looks nice and tight with very low drawdown. Play with the inputs to see what matches your own risk profile. I would not recommend taking this into much lower timeframes as trading fees are not included in the profit calculations. Please don't get burned trading on stupid high leverage. This indicator is probably not going to work well on alts, as Bitcoin FOMO build up and behavior is different. This whole indicator is tuned to Bitcoin, and attempts to trade only the meatiest part of the market moves.
Weaknesses: it can sometimes pick to trade the wrong direction if if hits support or resistance and changes direction after a trade is entered. Use a stoploss.
Strengths: It usually gets things right. Historically over 57% right.
Use at your own risk!
Hophop Volatility StrategyTrading strategy based on Volatility of the instrument
Initial version is 40.65 % profitable for XBTUSD between 01/01/2018 and 12/10/2019 with a profit factor of 1.8 and with the drawback of %20 max drawdown overall profit for the same period is 1200%
Next version will reduce the max drawdown
Initial analysis has been done by @cryptowarren / @xryptowarren
Strategy for The Bitcoin Buy/Sell IndicatorThis is the strategy for
Starting with a capital of $3,000 XBT , one might have $15,975 dollar worth of XBT plus whatever the bitcoin has appreciated over the years.
The Sharpe Ratio: 0.586, Net Profit is 532%, 57 closed trades from 2017 till today, Profit factor of 3.745 (aka for every dollar loss, there is 3.745 dollar profit) with 14% drawdown .
Let that sink in.
MA cross strategyThis strategy uses simple moving average cross for entry signals, but it can be customized with 3 cases:
1- exit at take profit and stop loss;
2- exit when distance between close and moving average is above a user defined minimum;
3- use Renko candles to calculate the moving average without changing the graph candles.
The third case is the one with better results, but for non-pro users can be used only with daily time frame.
Look at profit factor and percent of winning trades.
You can test also on your favorite pair, but most important is setting correct brick size.
At request, I could share also a screener with alarms for finding which symbol statisfy entry rules.
Please use comment section for any feedback.
********************************** IMPORTANT*******************************
I have developed an expert advisor for metatrader4 (MT4): results of expert advisor form 2015-01-01 to today are very good with low drawdown and good profit.
********************************************************************************
Moving Average R/S StrategySELL signals made by Moving Average system.
Inputs:
- Volatility: Volatility index of the asset in use.
- Size: Amount of contracts you will use in the asset.
It works really well in indexes, commodities and stock market.
If the tester shows red you have to change the volatility index.
Profit factor high with more than 80% profitable trades in most of cases.
Adaptive Zero Lag EMA [STUDY]A user has asked for the Study/Indicator version of this Strategy .
If you encounter the error "loop....>100ms" simply toggle the eye icon to hide and unhide the indicator
The following is simply quoted from my previous post for your convenience: (obviously there won't be risk, Stop Loss, or Take profit parameters!)
OPERATING PRINCIPLE
The strategy is based on Ehlers idea that any indicator can be turned into a signal-producing trade system through smoothing and other filtering processes.
In fact, I'm using his Zero Lag EMA ( ZLEMA ) as a baseline indicator as well as some code snippets he has made public (1). God bless open source!
Next, I've provided the option to use an Instantaneous Frequency Measurement (IFM) method, which will adaptively choose the best period for the ZLEMA (2)
I've written other studies that use the differential calculus approximations for IFM, so it was only natural to include them in this strategy.
The primary two are Cosine IFM (3) and In-phase Quadrature IFM (4). You can also find an indicator with both plotted and the ability to average them together, as one IFM prefers long periods and the other short. (5)
BEFORE WE BEGIN
1. This strategy only runs on "normal" FX pairs ( EURUSD , GBPJPY , AUDUSD ...) and will fail on Metals or Commodities.
Cryptos are largely untested.
2. Please run it on these time frames: M15 to D.
Anything outside this range will likely fail.
HOW TO USE AND SUCCEED
1. If the Default settings don't produce good results right off the bat, then lower gain limit to 1 or 2 and threshold to 0.01.
2. Test each setting under adaptive method. If you want to leave it Off, then I'd recommend using some kind of IFM (see my links below) to
discover the most efficient period to use.
3. Once you have the best adaptive method chosen, begin incrementing gain limit until you find a nice balance between profit factor ( PF ) and drawdown.
4. Now, begin incrementing threshold. The goal is to have PF above 2 and a drawdown as low as possible.
5. Finally, change the source! Typically, close is the best option, but I have run into cases where high
yielded the highest returns and win rate.
6. Sit back, relax, and tweak the risk until you're happy with the return and drawdown amounts.
ADVANCED
You may need to adjust take profit (TP) points and stop loss (SL) points to create the best entry possible. Don't be greedy! You'll likely have poor
results if the TP is set to 300 and SL is 50.
If you are trading a pair that has a long Dominant Cycle Period, then you may increase Max Period to allow the IFM
to accept longer periods. Any period above the Max Period will be rejected. This may increase lag time!
Cheers and good luck trading!
-DasanC
(1)www.mesasoftware.com
(2)www.jamesgoulding.com
(3) Cosine IFM
(4) I-Q IFM
(5) Averaging IFM
IFM stands for Instantaneous frequency measurement
Adaptive Zero Lag EMA v2This is my most successful strategy to date! Please enjoy and join the Open Source movement by sharing your code and ideas online!
OPERATING PRINCIPLE
The strategy is based on Ehlers idea that any indicator can be turned into a signal-producing trade system through smoothing and other filtering processes.
In fact, I'm using his Zero Lag EMA (ZLEMA) as a baseline indicator as well as some code snippets he has made public (1). God bless open source!
Next, I've provided the option to use an Instantaneous Frequency Measurement (IFM) method, which will adaptively choose the best period for the ZLEMA (2)
I've written other studies that use the differential calculus approximations for IFM, so it was only natural to include them in this strategy.
The primary two are Cosine IFM (3) and In-phase Quadrature IFM (4). You can also find an indicator with both plotted and the ability to average them together, as one IFM prefers long periods and the other short. (5)
BEFORE WE BEGIN
1. This strategy only runs on "normal" FX pairs (EURUSD, GBPJPY, AUDUSD ...) and will fail on Metals or Commodities.
Cryptos are largely untested.
2. Please run it on these time frames: M15 to D.
Anything outside this range will likely fail.
HOW TO USE AND SUCCEED
1. If the Default settings don't produce good results right off the bat, then lower gain limit to 1 or 2 and threshold to 0.01.
2. Test each setting under adaptive method . If you want to leave it Off , then I'd recommend using some kind of IFM (see my links below) to
discover the most efficient period to use.
3. Once you have the best adaptive method chosen, begin incrementing gain limit until you find a nice balance between profit factor (PF) and drawdown.
4. Now, begin incrementing threshold . The goal is to have PF above 2 and a drawdown as low as possible.
5. Finally, change the source ! Typically, close is the best option, but I have run into cases where high
yielded the highest returns and win rate.
6. Sit back, relax, and tweak the risk until you're happy with the return and drawdown amounts.
ADVANCED
You may need to adjust take profit (TP) points and stop loss (SL) points to create the best entry possible. Don't be greedy! You'll likely have poor
results if the TP is set to 300 and SL is 50.
If you are trading a pair that has a long Dominant Cycle Period , then you may increase Max Period to allow the IFM
to accept longer periods. Any period above the Max Period will be rejected. This may increase lag time!
Cheers and good luck trading!
-DasanC
PS - This code doesn't repaint or have future-leak, which was present in Pinescript v2.
PPS - Believe me! These returns are typical! Sometimes you must push aside the "if it's too good to be true..." mindset that society has ingrained in you.
Do you really believe the most successful pass up opportunities before investigating them? ;)
(1) Ehlers & Ric Zero Lag EMA
(2) Measuring Cycles by Ehlers
(3) Cosine IFM
(4) Inphase Quadrature IFM
(5) Averaging IFM
HelloEpicWorld[Eric] Version 1.0This Script is the most powerful script on earth. In 238 Total Closed Trades, it can make a 33587895.97% Net Profit with 0.1% (high commission fee), with out commission fee on gdax, it can go even much higher. And the Profit Factor is the highers of 15.1 on earth.
Usage :
When the background turn green, it's good to long at anywhere between the first buy signal to the nearest 10 candles.
When the background turn red, it's good to short at anywhere between the first sell signal to the nearest 10 candles.
It can not only use on the crypto but also the forex, stock, etc.
The 15 Minutes SlingShot System StrategyUse this strategy on the 15 Minutes timeframe for maximum profit. Even if the profitability is less than 60%, the profit factor is still above 5 for minimum losses which make it very profitable. The strategy is based on the SlingShot System Study.
MACs EasyMoney - LongTermSignalsIntroducing " MACs EasyMoney - LongTermSignals " Indicator. Specially designed for weekly and 1 Month duration charts . Picks the calls perfectly :)
Latest other updates:
BOT Trading Integration is completed for the following indicators,
1) MACs EasyMoney - Swing Trade Signals
2) MACs EasyMoney - Scalp Trade Signals
Strategy Test Report for the BOT script shows the following results,
* Profitable Percent = 99.42%
* Profitable Factor = 93.76
Thanks,
Mac.
XT AI Trading System for XBTUSD (BitMEX)- Features:
+ XT-AI-TRADE System with special built-in XT-AI Trend line, trend cloud indicator for XBTUSD (BitMEX) with the best performance.
+ Full backtesting from April 2018 with results as below:
Time frame / Net profit / Percent profitable / Profit factor
H1: 450% / 80% / 74.187
H2: 445% / 100% / Max
H3: 778% / 80% / 17.264
H4: 624% / 85.71% / 119.905
D1: 169% / 100% / Max
+ Separately optimized AI trading algorithm for different time frames: H1/H2/H3/H4/D1 (including Margin and Exchange Trading).
+ Trustworthy backtesting accuracy result with 100% non-repainting, no difference between backtesting and live trading.
+ Real-time push notification system: Email / Telegram... to your PC and Smartphone => Enjoy trading life.
+ 24/7 business operation.
*** Sign up for a trial here : goo.gl
Long Term Strategy (100% BTC, only Longs)My BTCUSD Long Term Strategy,
based on Ichimoku, BB, EMA's & some William's Alligator & Fractals.
Up to this point only gave profitable long trades on BTCUSD (100% profit factor).
Have fun & be careful, nothing is bullet proof.
Ciao!
PARSEC Bitcoin strategy for testing: SMA + ADX + Fisher transfStrategy using SMA, ADX and modified Fisher transform (I've made linear transformation on original Ehler's Fisher transform) and implemented into Bitcoin trading perspective.
Current strategy is optimized for Bitcoin.
General objectives is to add, remove indicators:
- to further improve the strategy for Bitcoin
- adjust the strategy to be feasible for wider range of cryptocurrencies (preferably for the top 2-5 or top 2-10 ones), without significantly decreasing the current profit factor and profit rates
Experienced technical analysts feel free to PM me if you want to test the strategy (at this stage up to 5 people's participation would be appreciated).
For those ones who significantly contribute, I will give life-long access to both the improved strategy and alerts.
Vix FIX / StochRSI StrategyThis strategy is based off of Chris Moody's Vix Fix Indicator . I simply used his indicator and added some rules around it, specifically on entry and exits.
Rules :
Enter upon a filtered or aggressive entry
If there are multiple entry signals, allow pyramiding
Exit when there is Stochastic RSI crossover above 80
This works great on a number of stocks. I am keeping a list of stocks with decent Profit Factors and clean equity curves here .
Possible ways to use this:
Modify this script and setup alerts around the various entries
Use as is with different stocks or currency pairs
Modify entry / exit points to make it more profitable for even more symbols and currencies
MULTIPLE TIME-FRAME STRATEGY(TREND, MOMENTUM, ENTRY) Hey everyone, this is one strategy that I have found profitable over time. It is a multiple time frame strategy that utilizes 3 time-frames. Highest time-frame is the trend, medium time-frame is the momentum and short time-frame is the entry point.
Long Term:
- If closed candle is above entry then we are looking for longs, otherwise we are looking for shorts
Medium Term:
- If Stoch SmoothK is above or below SmoothK and the momentum matches long term trend then we look for entries.
Short Term:
- If a moving average crossover(long)/crossunder(short) occurs then place a trade in the direction of the trend.
Close Trade:
- Trade is closed when the Medium term SmoothK Crosses under/above SmoothD.
You can mess with the settings to get the best Profit Factor / Percent Profit that matches your plan.
Best of luck!
MACD, backtest 2015+ only, cut in half and doubledThis is only a slight modification to the existing "MACD Strategy" strategy plugin!
found the default MACD strategy to be lacking, although impressive for its simplicity. I added "year>2014" to the IF buy/sell conditions so it will only backtest from 2015 and beyond ** .
I also had a problem with the standard MACD trading late, per se. To that end I modified the inputs for fast/slow/signal to double. Example: my defaults are 10, 21, 10 so I put 20, 42, 20 in. This has the effect of making a 30min interval the same as 1 hour at 10,21,10. So if you want to backtest at 4hr, you would set your time interval to 2hr on the main chart. This is a handy way to make shorter time periods more useful even regardless of strategy/testing, since you can view 15min with alot less noise but a better response.
Used on BTCCNY OKcoin, with the chart set at 45 min (so really 90min in the strategy) this gave me a percent profitable of 42% and a profit factor of 1.998 on 189 trades.
Personally, I like to set the length/signals to 30,63,30. Meaning you need to triple the time, it allows for much better use of shorter time periods and the backtests are remarkably profitable. (i.e. 15min chart view = 45min on script, 30min= 1.5hr on script)
** If you want more specific time periods you need to try plugging in different bar values: replace "year" with "n" and "2014" with "5500". The bars are based on unix time I believe so you will need to play around with the number for n, with n being the numbers of bars.
CamarillaStrategy -V1 - H4 and L4 breakout - exits addedExits added using trailing stops.
2.6 Profit Factor and 76% Profitable on SPY , 5M - I think it's a pretty good number for an automated strategy that uses Pivots. I don't think it's possible to add volume and day open price in relation to pivot levels -- that's what I do manually ..
Still trying to add EMA for exits.. it will increase profitability. You can play in pinescript with trailing stops entries..
RotationSUITE [BitAura]𝐑otation𝑺𝑼𝑰𝑻𝑬
This Pine Script® indicator is a dynamic, multi-asset rotation system designed to optimize portfolio allocation by selecting the strongest-performing cryptocurrency from a user-defined basket of up to four assets, with USD as a cash position. By leveraging two complementary relative strength strategies and a proprietary Confidence Score, the system adapts to changing market conditions to aim for superior risk-adjusted returns compared to a buy-and-hold approach.
Logic and Core Concepts
The system’s goal is to allocate capital to the strongest asset at any given time, dynamically switching between two strategies based on market conditions:
1. Ratios System (Primary Strategy)
Mechanism : Performs relative strength analysis by evaluating the trend of each asset pair (e.g., BTCUSD/ETHUSD, BTCUSD/SOLUSD) using a universal trend-capturing function.
Scoring : Each asset earns points based on how many other assets (including USD) it outperforms.
Allocation : Allocates 100% of the portfolio to the asset with the highest score, following a "long the strongest" approach.
2. Alpha System (Defensive Strategy)
Mechanism : Measures each asset’s alpha (excess return relative to market risk, or beta) against a broad market benchmark. A fast trend-following model confirms momentum.
Allocation : Allocates to the asset with the highest positive alpha and confirmed momentum, or to USD if no asset meets the criteria.
3. Confidence Score (Decision Engine)
Monitors the Ratios System’s performance.
High Confidence : Uses the Ratios System for allocation during strong trends.
Low Confidence : Switches to the Alpha System or USD during choppy or corrective markets.
Features
Dynamic Strategy Switching : Seamlessly transitions between Ratios and Alpha systems based on the Confidence Score.
Customizable Asset Basket : Supports up to four user-defined crypto assets (e.g., INDEX:BTCUSD , INDEX:ETHUSD , CRYPTO:SOLUSD , CRYPTO:SUIUSD ).
Comprehensive Visuals :
Performance Metrics Table : Displays Sharpe, Sortino, Omega, Max Drawdown, and Profit Factor for the system, its sub-strategies, and individual assets’ buy-and-hold performance.
Rotation Matrix : Shows pairwise trend scores for the Ratios System and alpha/trend data for the Alpha System.
Allocation Table : Indicates the current portfolio allocation (in %).
Equity Curve Analysis : Plots equity curves for the system, sub-strategies, and buy-and-hold for comparison.
Configurable Alerts : Notifies users of changes in allocation or Confidence Score.
Pine Script v6 : Utilizes advanced features like matrices and table formatting for enhanced usability.
How to Use
Add to Chart : Apply the indicator to any chart (the chart’s ticker does not affect calculations).
Configure Assets : In the settings ( Inputs -> Majors Rotation System Tickers ), define up to four crypto assets. Defaults include INDEX:BTCUSD , INDEX:ETHUSD , CRYPTO:SOLUSD , and CRYPTO:SUIUSD .
Set Allocation Type : Choose Aggressive (100% to top asset), Moderate (80/20 split), or Conservative (60/40 split) in the settings.
Monitor Output : The Portfolio Allocations table shows the current allocation. Use the Performance Metrics and Rotation Matrix tables for deeper insights.
Analyze Equity : Enable equity curve plots in the settings to visualize performance.
Set Alerts : Right-click a plot, select "Add alert," and choose "Confidence Score changed" or "Calculated Portfolio Allocations Changed" to receive notifications.
The system uses robust trend and alpha functions, tested across various timeframes (4h, 8h, 12h) and asset pools to ensure reliability.
Notes
The script is closed-source
Ensure the chart uses a standard price series (not Heikin Ashi or other non-standard types) for accurate results.
The script avoids lookahead bias by using barmerge.lookahead_off in request.security() calls.
Performance metrics are calculated only on the last confirmed bar to optimize runtime efficiency.
Disclaimer : This script is for educational and analytical purposes only and does not constitute financial advice. Trading involves significant risk, and past performance is not indicative of future results. Always conduct your own research and apply proper risk management.
THE BATATAH SAUCE BTC.PERP TRADING STRAT12hr hour is the sweet spot
great profit factor
decent risk management avg losing (back tested for 5 yrs and does alright till even 2018)trade 8.21% vs avg winning 174.87% (back tested for 5 yrs and does alright since even start2018)
Its alright on daily as well as 6hr but lower just gets more noisy
Hassi XAUUSD Advanced FVG EMA/BOS/RSI/Volume + Session FilterWhat it does :
This strategy automates a popular ICT-style idea on XAUUSD (Gold): trade only when price taps back into a Fair Value Gap (FVG), but filter entries with trend, structure, momentum, volume, and session rules. It manages risk with fixed TP/SL (points) and shows a compact backtest panel on chart.
Core Logic
1) Market Structure (BOS)
Detects recent swing highs/lows and flags a Break of Structure:
BOS Up when price breaks the latest swing high.
BOS Down when price breaks the latest swing low.
2) FVG Detection (3-candle)
Bullish FVG when low > high and low > high .
Bearish FVG when high < low and high < low .
The most recent qualifying gap is drawn as a shaded box (optional).
3) Bias & Filters
Trend Bias: price vs EMA (default 200). Longs only above EMA; shorts only below.
Momentum: optional RSI filter (default 14); avoid longs in OB & shorts in OS.
Volume: optional filter requiring current volume > SMA(20) × multiplier.
Sessions: optional London / New York (PKT) time windows.
Entries & Exits
Long Entry (all must be true)
Above EMA, RSI bullish, volume ok, session ok, BOS Up.
A recent Bullish FVG exists (within N bars).
Price taps back into the FVG (low ≤ top & close > bottom) with a bullish candle.
Short Entry (mirror)
Below EMA, RSI bearish, volume ok, session ok, BOS Down.
A recent Bearish FVG exists (within N bars).
Price taps (high ≥ bottom & close < top) with a bearish candle.
Risk / R:R
Exits use fixed points on XAUUSD (default TP 100, SL 50).
On many gold feeds 1.0 = 10 points; inputs convert to price automatically.
“One-trade-at-a-time”: a new signal won’t fire until the previous position is flat.
Chart Labels
On entry, the script plots BUY/SELL plus fixed TP/SL lines & labels anchored to the entry bar (they don’t drift with price).
Visuals & Tools
EMA line (green/red by bias).
Swing points (tiny triangles) to see structure.
FVG boxes (green/red, optional).
Session shading (subtle blue overlay).
Stats Panel (top-right):
Total Trades, TP Hits, SL Hits, Win Rate, Profit Factor, Net P&L.
Inputs (quick guide)
EMA Length (default 200)
Swing Lookback for BOS (default 5)
FVG Box Length (how far the zone extends to the right)
TP / SL (points) for XAUUSD + display Risk:Reward
Sessions (PKT): London & New York windows + toggle
Filters: Volume (multiplier), RSI (length, OB/OS)
Visibility: show/hide FVG boxes & TP/SL drawings
Alerts
Buy Signal / Sell Signal on valid entries
Position Opened / Position Closed notifications
Best Practices & Notes
Designed for XAUUSD 15-minute. You can test other timeframes, but retune TP/SL points and filters accordingly.
Broker ticks differ: if your symbol steps are not 0.1, adjust TP/SL points.
Use with a HTF confluence (e.g., D1/4H bias, key S/R, news awareness).
Backtests are approximations; real results vary with spreads, slippage, and execution.
Disclaimer: This tool is for educational purposes. It is not financial advice. Always test before using on live capital.
Backtest - Strategy Builder [AlgoAlpha]🟠 OVERVIEW
This script by AlgoAlpha is a modular Strategy Builder designed to let traders test custom trade entry and exit logic on TradingView without writing their own Pine code. It acts as a framework where users can connect multiple external signals, chain them in sequences, and run backtests with built-in leverage, margin, and risk controls. Its main strength is flexibility—you can define up to five sequential steps for entry and exit conditions on both long and short sides, with logic connectors (AND/OR) controlling how conditions combine. This lets you test complex multi-step confirmation workflows in a controlled, visual backtesting environment.
🟠 CONCEPTS
The system works by linking external signals —these can be values from other indicators, and/or custom sources—to conditional checks like “greater than,” “less than,” or “crossover.” You can stack these checks into steps , where all conditions in a step must pass before the sequence moves to the next. This creates a chain of logic that must be completed before a trade triggers. On execution, the strategy sizes positions according to your chosen leverage mode ( Cross or Isolated ) and allocation method ( Percent of equity or absolute USD value]). Liquidation prices are simulated for both modes, allowing realistic margin behaviour in testing. The script also tracks performance metrics like Sharpe, Sortino, profit factor, drawdown, and win rate in real time.
🟠 FEATURES
Up to 5 sequential steps for both long and short entries, each with multiple conditions linked by AND/OR logic.
Two leverage modes ( Cross and Isolated ) with independent long/short leverage multipliers.
Separate multi-step exit triggers for longs and shorts, with optional TP/SL levels or opposite-side triggers for flipping positions.
Position sizing by equity percent or fixed USD amount, applied before leverage.
Realistic liquidation price simulation for margin testing.
Built-in trade gating and validation—prevents trades if configuration rules aren’t met (e.g., no exit defined for an active side).
Full performance dashboard table showing live strategy status, warnings, and metrics.
Configurable bar coloring based on position side and TP/SL level drawing on chart.
Integration with TradingView's strategy backtester, allowing users to view more detailed metrics and test the strategy over custom time horizons.
🟠 USAGE
Add the strategy to your chart. In the settings, under Master Settings , enable longs/shorts, select leverage mode, set leverage multipliers, and define position sizing. Then, configure your Long Trigger and Short Trigger groups: turn on conditions, pick which external signal they reference, choose the comparison type, and assign them to a sequence step. For exits, use the corresponding Exit Long Trigger and Exit Short Trigger groups, with the option to link exits to opposite-side entries for auto-flips. You can also enable TP and/or SL exits with custom sources for the TP/SL levels. Once set, the strategy will simulate trades, show performance stats in the on-chart table, and highlight any configuration issues before execution. This makes it suitable for testing both simple single-signal systems and complex, multi-filtered strategies under realistic leverage and margin constraints.
🟠 EXAMPLE
The backtester on its own does not contain any indicator calculation; it requires input from external indicators to function. In this example, we'll be using AlgoAlpha's Smart Signals Assistant indicator to demonstrate how to build a strategy using this script.
We first define the conditions beforehand:
Entry :
Longs – SSA Bullish signal (strong OR weak)
Shorts – SSA Bearish signal (strong OR weak)
Exit
Longs/Shorts: (TP/SL hit OR opposing signal fires)
Other Parameters (⚠️Example only, tune this based on proper risk management and settings)
Long Leverage: default (3x)
Short Leverage: default (3x)
Position Size: default (10% of equity)
Steps
Load up the required indicators (in this example, the Smart Signals Assistant).
Ensure the required plots are being output by the indicator properly (signals and TP/SL levels are being plotted).
Open the Strategy Builder settings and scroll down to "CONDITION SETUP"; input the signals from the external indicator.
Configure the exit conditions, add in the TP/SL levels from the external indicator, and add an additional exit condition → {{Opposite Direction}} Entry Trigger.
After configuring the entry and exit conditions, the strategy should now be running. You can view information on the strategy in TradingView's backtesting report and also in the Strategy Builder's information table (default top right corner).
It is important to note that the strategy provided above is just an example, and the complexity of possible strategies stretches beyond what was shown in this short demonstration. Always incorporate proper risk management and ensure thorough testing before trading with live capital.
MA SniperThis indicator automatically finds the most effective moving average to use in a price crossover strategy—so you can focus on trading, not testing. It continuously evaluates a wide range of moving average periods, ranks them based on real-time market performance, and selects the one delivering the highest quality signals. The result? A smarter, adaptive tool that shows you exactly when price crosses its optimal moving average—bullish signals in green, bearish in red.
What makes it unique is the way it thinks.
Under the hood, the script doesn’t just pick a random MA or let you choose one manually. Instead, it backtests a large panel of moving average lengths for the current asset and timeframe. It evaluates each one by calculating its **Profit Factor**—a key performance metric used by pros to measure the quality of a strategy. Then, it assigns each MA a score and ranks them in a clean, built-in table so you can see, at a glance, which ones are currently most effective.
From that list, it picks the top-performing MA and uses it to generate live crossover signals on your chart. That MA is plotted automatically, and the signals adapt in real-time. This isn’t a static setup—it’s a dynamic system that evolves as the market evolves.
Even better: the indicator detects the type of instrument you’re trading (forex, stocks, etc.) and adjusts its internal calculations accordingly, including how many bars per day to consider. That means it remains highly accurate whether you’re trading EURUSD, SPX500, or TSLA.
You also get a real-time dashboard (via the table) that acts as a transparent scorecard. Want to see how other MAs are doing? You can. Want to understand why a certain MA was selected? The data is right there.
This tool is for traders who love crossover strategies but want something smarter, faster, and more precise—without spending hours manually testing. Whether you're scalping or swing trading, it offers a data-driven edge that’s hard to ignore.
Give it a try—you’ll quickly see how powerful it can be when your MA does the thinking for you.
This tool is for informational and educational purposes only. Trading involves risk, and past performance does not guarantee future results. Use responsibly.